package com.csu.tingtian.service;

import com.csu.tingtian.common.CommonResponse;
import com.csu.tingtian.entity.Account;
import com.csu.tingtian.entity.UnDeterminedFarms;
import com.csu.tingtian.vo.Business;

import java.util.List;

public interface AccountService {
    //根据用户名获取单个用户
    CommonResponse<Account> getAccount(String username);
    //根据用户名和密码获取用户
    CommonResponse<Account> getAccount(String username, String password);
    //根据手机号获取用户信息
    CommonResponse<Account> getAccountByPhone(String phone);
    //插入一个用户到数据库
    CommonResponse<Account> insertAccount(Account account);
    //更新用户信息
    CommonResponse<Account> updateAccount(Account accountt);
    //判断是否已存在该用户
    CommonResponse<String> isExit(String username);
    //返回用户类型
    CommonResponse<String[]> getIdentity(String username);
    //获取所有用户
    CommonResponse<List<Account>> getAllAccount();
    //申请成为商家，插入一个记录到undeterminedfarm
    CommonResponse<UnDeterminedFarms> insertUndeterminedFarm(UnDeterminedFarms unDeterminedFarms);
    //若该用户的商家，获取个人信息和他的农场信息
    CommonResponse<Business> getBusiness(String userName);
}
